<%@ page pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<html>
    <head>
        <title>指标设置</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <style>
            #table{
                float:left;
                width:600px;
                height:400px;
                border:1px solid #666666;
            }
            
            #set_page{
                float:left;
                width:600px;
                height:30px;
            }

            #top{
                width:100%;
                  background:url(../image/biaoti.png);
                 height:60px;
                border-bottom: 1px solid #666666;
                padding-top:5px;
                font-size:14px;
                font-family:Arial, Helvetica, sans-serif;
            }

             .buttonok{
                width:45px;
                height: 25px;
                background:url(../image/ok.png);
                float:right;
              
                border:1px outset;
                text-align: center;
                padding-top:3px;
                margin-right: 10px;
                cursor: pointer;
                font-size:14px;
                font-family:Arial, Helvetica, sans-serif;
            }
                .buttoncancel{
                width:45px;
                height: 25px;
                background:url(../image/cancel.png);
                float:right;
              
                border:1px outset;
                text-align: center;
                padding-top:3px;
                margin-right: 10px;
                cursor: pointer;
                font-size:14px;
                font-family:Arial, Helvetica, sans-serif;
            }
            
            .page{
                width:20px;
                height:20px;
                margin-top: 5px;
                background:url(../image/leaf.png);
              
                cursor: pointer;
               color: white;
                padding-left:5px; 
            }
        </style>
        <script language="javascript">
            var index=0;

            function submit()
            {
                var form=document.getElementById('thisform');
                form.submit();
            }
            
            function show(page_no)
            {
                var all_page=document.getElementById('table').getElementsByTagName('table');

                for(var i=0;i<all_page.length;i++)
                    all_page[i].style.display="none";
                
                all_page[page_no].style.display="block";
            }
        </script>
    </head>
    <body>
        <div style="width:600px;float:left;">
        <div id="table">
            <span id="top"><b>环境指标设置</b></span>
            <form id="thisform" action="config_Environment_Index?enterpriseId=<s:property value="enterpriseId" />" method="post">
                <table style="display:block;">
                    <s:iterator value="outValueDTOList" var="list" status="guide">
                        <s:if test="#guide.index<outValueDTOList.size()/4">
                        <tr>
                            <td>
                                <s:property value="#list.factorName"/><input type="hidden" name="valueListDTO.factorName[<s:property value="#guide.index" />]" value="<s:property value='#list.factorName'/>"/>
                                <s:if test="#list.type == -1">大于<input type="text" size="10"name="valueListDTO.standardValue[<s:property value="#guide.index" />]" value="<s:property value='#list.standardValue' />"/></s:if>
                                <s:elseif test="#list.type == 0">小于<input type="text" size="10"name="valueListDTO.standardValue[<s:property value="#guide.index" />]" value="<s:property value='#list.standardValue' />"/></s:elseif>
                                <s:else>与标准值<input type="text" size="10"name="valueListDTO.standardValue[<s:property value="#guide.index" />]" value="<s:property value='#list.standardValue' />"/>差大于 <input type="text" size="10" name="valueListDTO.type[<s:property value="#guide.index" />]" value="<s:property value="#list.type" />"/></s:else>
                                ,变动幅度超过<input type="text" size="10"name="valueListDTO.changeValue[<s:property value="#guide.index" />]" value="<s:property value='#list.changeValue' />"/>%时通知我。
                            </td>
                        </tr>
                        </s:if>                     
                    </s:iterator>
                </table>
                <table style="display:none;">
                    <s:iterator value="outValueDTOList" var="list" status="guide">
                        <s:if test="#guide.index>=outValueDTOList.size()/4&&#guide.index<outValueDTOList.size()/2">
                        <tr>
                            <td>
                                <s:property value="#list.factorName"/><input type="hidden" name="valueListDTO.factorName[<s:property value="#guide.index" />]" value="<s:property value='#list.factorName'/>"/>
                                <s:if test="#list.type == -1">大于<input type="text" size="10"name="valueListDTO.standardValue[<s:property value="#guide.index" />]" value="<s:property value='#list.standardValue' />"/></s:if>
                                <s:elseif test="#list.type == 0">小于<input type="text" size="10"name="valueListDTO.standardValue[<s:property value="#guide.index" />]" value="<s:property value='#list.standardValue' />"/></s:elseif>
                                <s:else>与标准值<input type="text" size="10"name="valueListDTO.standardValue[<s:property value="#guide.index" />]" value="<s:property value='#list.standardValue' />"/>差大于 <input type="text" size="10" name="valueListDTO.type[<s:property value="#guide.index" />]" value="<s:property value="#list.type" />"/></s:else>
                                ,变动幅度超过<input type="text" size="10"name="valueListDTO.changeValue[<s:property value="#guide.index" />]" value="<s:property value='#list.changeValue' />"/>%时通知我。
                            </td>
                        </tr>
                        </s:if>                     
                    </s:iterator>
                </table>        
                <table style="display:none;">
                    <s:iterator value="outValueDTOList" var="list" status="guide">
                        <s:if test="#guide.index>=outValueDTOList.size()/2&&#guide.index<(outValueDTOList.size()*3)/4">
                        <tr>
                            <td>
                                <s:property value="#list.factorName"/><input type="hidden" name="valueListDTO.factorName[<s:property value="#guide.index" />]" value="<s:property value='#list.factorName'/>"/>
                                <s:if test="#list.type == -1">大于<input type="text" size="10"name="valueListDTO.standardValue[<s:property value="#guide.index" />]" value="<s:property value='#list.standardValue' />"/></s:if>
                                <s:elseif test="#list.type == 0">小于<input type="text" size="10"name="valueListDTO.standardValue[<s:property value="#guide.index" />]" value="<s:property value='#list.standardValue' />"/></s:elseif>
                                <s:else>与标准值<input type="text" size="10"name="valueListDTO.standardValue[<s:property value="#guide.index" />]" value="<s:property value='#list.standardValue' />"/>差大于 <input type="text" size="10" name="valueListDTO.type[<s:property value="#guide.index" />]" value="<s:property value="#list.type" />"/></s:else>
                                ,变动幅度超过<input type="text" size="10"name="valueListDTO.changeValue[<s:property value="#guide.index" />]" value="<s:property value='#list.changeValue' />"/>%时通知我。
                            </td>
                        </tr>
                        </s:if>                     
                    </s:iterator>
                </table> 
                <table  style="display:none;">
                    <s:iterator value="outValueDTOList" var="list" status="guide">
                        <s:if test="#guide.index>=(outValueDTOList.size()*3)/4&&#guide.index<outValueDTOList.size()">
                        <tr>
                            <td>
                                <s:property value="#list.factorName"/><input type="hidden" name="valueListDTO.factorName[<s:property value="#guide.index" />]" value="<s:property value='#list.factorName'/>"/>
                                <s:if test="#list.type == -1">大于<input type="text" size="10"name="valueListDTO.standardValue[<s:property value="#guide.index" />]" value="<s:property value='#list.standardValue' />"/></s:if>
                                <s:elseif test="#list.type == 0">小于<input type="text" size="10"name="valueListDTO.standardValue[<s:property value="#guide.index" />]" value="<s:property value='#list.standardValue' />"/></s:elseif>
                                <s:else>与标准值<input type="text" size="10"name="valueListDTO.standardValue[<s:property value="#guide.index" />]" value="<s:property value='#list.standardValue' />"/>差大于 <input type="text" size="10" name="valueListDTO.type[<s:property value="#guide.index" />]" value="<s:property value="#list.type" />"/></s:else>
                                ,变动幅度超过<input type="text" size="10"name="valueListDTO.changeValue[<s:property value="#guide.index" />]" value="<s:property value='#list.changeValue' />"/>%时通知我。
                            </td>
                        </tr>
                        </s:if>                     
                    </s:iterator>
                    <tr>
                        <td>
                            <span class="buttonok"></span>
                            <span class="buttoncancel" onClick="submit();"></span>                            
                        </td>
                    </tr>    
                </table>                             
            </form>
        </div>
                <div id="set_page">
                    <span class="page" onClick="show(0)">1</span>
                    <span class="page" onClick="show(1)">2</span>
                    <span class="page" onClick="show(2)">3</span>
                    <span class="page" onClick="show(3)">4</span>
                </div>        
      </div>
    </body>
</html>

